<div class="box">
  <div class="hd">友情链接管理 &darr;</div>
  <div class="bd"> 
      <?php //print_r($links_array);
      
      ?>
    <!-- <div class="ctrl"><a href="#" title="添加导航">添加导航</a></div> -->
    <table class="itbale">
      <tr>
        <td>编号</td>
        <td>链接名称</td>
        <td>链接图片logo</td>
        <td>链接地址</td>
        <td>操作</td>
      </tr>
      
      <?php
          $base_url=base_url();
              $thum_url= $base_url."/uploads/links/thum";
      foreach($links_array as $key=>$val){
       $del_url=site_url("admin/links_manag/del_link/{$val["id"]}");      
          
  echo "     
      <tr>
        <td>{$val["id"]}</td>
  <td>{$val["title"]}</td>             
        <td><img src=\"{$thum_url}/{$val["img"]}\"  /></td>
        <td>{$val["url"]}</td>
     
        <td> <a href=\"{$del_url}\" title=\"删除\">删除</a> </td>
      </tr> "   ;   //.anchor('admin/links_manag/edit_links/'.$val["id"],'编辑','class="edit"')."
      }
      ?>
    </table>
  </div>
</div>


<div class="box">
  <div class="hd">添加友情链接 &darr;</div>
  <div class="bd">
    <form action="<?php 
            
           echo site_url("admin/links_manag/add_link");
            ?>" method="post" enctype="multipart/form-data">
      <table class="formtable">
        <tr>
          <th>链接名称</th>
          <td><input type="text" size="30" name="title" /></td>
        </tr>
        <tr>
          <th>链接地址</th>
          <td><input type="text" size="30" name="url" /></td>
        </tr>
        <tr>
          <th>链接图片</th>
          <td><input type="file" size="30" name="img" /></td>
        </tr>
        <tr>
          <th>顺序</th>
          <td><input type="text" size="5" name="order" /></td>
        </tr>
        <tr>
          <th></th>
          <td><input type="submit" name="add_submit" value="添加链接" /></td>
        </tr>
      </table>
    </form>
  </div>
</div>
